package com.oneraku.service.controller;

import com.oneraku.service.domain.Merchant;
import com.oneraku.service.domain.UserInfo;
import com.oneraku.service.service.IMerchantService;
import com.oneraku.service.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: hui.ren@huberbuy.com
 * @Date: 2020/3/12 10:28
 */
@RestController
@RequestMapping("/home")
public class HomeController {
    private IMerchantService merchantService;
    @Autowired
    public HomeController(IMerchantService merchantService) {
        this.merchantService = merchantService;
    }

    /**
     * 热门商家列表
     * @param
     * @return
     */
    @GetMapping("/hotMerchant")
    public R hotMerchant() {
        return merchantService.hotMerchant();
    }

    /**
     * 热门商家列表
     * @param
     * @return
     */
    @GetMapping("/v2/hotMerchant")
    public R hotMerchantV2() {
        return merchantService.hotMerchantV2();
    }
}
